import request from '../utils/request'

export function faceLogin(formData) {
    return request({
        url: '/faceLogin',
        method: 'post',
        data: formData,
        headers: {			//设置上传请求头
            'Content-Type': 'multipart/form-data'
        },
    })
}
/**
 *
 *人脸注册
 */
export function registered(formData, id) {
    return request({
        url: '/registerFace',
        method: 'post',
        data: formData,
        params: {
            id
        }
        ,
        headers: {			//设置上传请求头
            'Content-Type': 'multipart/form-data'
        },
    })
}

/**
 * 登录
 * @param {用户名}} username
 * @param {密码} password
 * @returns
 */
export function login(username, password) {
    return request({
        url: '/login',
        method: 'post',
        params: {
            username,
            password
        }
    })
}
